<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function fn(i){
        if (i==2 || i ==1){
            return 1;
        }else {
            return fn(i-1)+fn(i-2);
        }
    };
    for (var i=1;i<20;i++){
        console.log(fn(i))
    };
</script>
</body>
</html>